<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>观察 </title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>

  <div id="app">
      <div>{{fullName}}</div>
  </div>

<script>

    var app =new Vue({
        el:"#app",
        data: {
            firstName: 'zhang',
            lastName:'san',
            fullName: 'zhang san'
        },
        computed:{
            fullName() {
                return this.firstName + ' ' + this.lastName;
            }
        }

    } );




</script>

</body>
</html>